<template>
	<web-view :src="webviewSrc"></web-view>
</template>

<script setup lang="ts">
	import { ref } from 'vue'
	import { onLoad } from "@dcloudio/uni-app"
	const webviewSrc = ref("");
	const dic = [
		{
			type:'MagicUIMagicUI_6.1.0',
			name: '荣耀',
			src:"https://ghzsj.sh985.com/jzshzs/allProblem/notConnected?brand=honor&phoneSystem=MagicUIMagicUI_6.1.0"
		},
		{
			type:'MIUIV140',
			name: '小米',
			src:"https://ghzsj.sh985.com/jzshzs/allProblem/notConnected?brand=xiaomi&phoneSystem=MIUIV140"
		},
		{
			type:'gameManagement',
			name: '应用游戏管理',
			src:"https://ghzsj.sh985.com/allProblem/software?fc=gameManagement"
		},
		{
			type:'timeManagement',
			name: '使用时间管理',
			src:"https://ghzsj.sh985.com/allProblem/software?fc=timeManagement"
		},
		{
			type:'whiteList',
			name: '白名单',
			src:"https://ghzsj.sh985.com/allProblem/software?fc=whiteList"
		},
		{
			type:'temporaryUnbind',
			name: '临时解绑',
			src:"https://ghzsj.sh985.com/allProblem/software?fc=temporaryUnbind"
		},
		{
			type:'location',
			name: '定位',
			src:"https://ghzsj.sh985.com/allProblem/software?fc=location"
		},
		{
			type:'realTime',
			name: '实时动态',
			src:"https://ghzsj.sh985.com/allProblem/software?fc=realTime"
		},
		{
			type:'statistics',
			name: '应用统计',
			src:"https://ghzsj.sh985.com/allProblem/software?fc=statistics"
		},
		{
			type:'usageDetails',
			name: '应用使用详情',
			src:"https://ghzsj.sh985.com/allProblem/software?fc=usageDetails"
		},
		{
			type:'newInstall',
			name: '新安装应用',
			src:"https://ghzsj.sh985.com/allProblem/software?fc=newInstall"
		},
		{
			type:'addDesktop',
			name: '添加到桌面',
			src:"https://ghzsj.sh985.com/allProblem/software?fc=addDesktop"
		},
		{
			type:'rongyaodingweiquanxian',
			name: '荣耀定位权限',
			src:"https://ghzsj.sh985.com/allProblem/permissions?brand=honor&phoneSystem=MagicUIMagicUI_6.1.0&pr=location"
		},
		{
			type:'rongyaoshebeiguanliqi',
			name: '荣耀设备管理器',
			src:"https://ghzsj.sh985.com/allProblem/permissions?brand=honor&phoneSystem=MagicUIMagicUI_6.1.0&pr=ohter"
		},
		{
			type:'rongyaowuzhangai',
			name: '荣耀无障碍',
			src:"https://ghzsj.sh985.com/allProblem/permissions?brand=honor&phoneSystem=MagicUIMagicUI_6.1.0&pr=accessibility"
		},
		{
			type:'xiaomiqiyemoshi',
			name: '小米企业模式',
			src:"https://ghzsj.sh985.com/allProblem/permissions?brand=xiaomi&phoneSystem=MIUIV140&pr=enterpriseModel"
		}		
	];
	onLoad(({ type }) => {
		const { src } = dic.find(item => item.type === type)
		webviewSrc.value = src
	})
</script>

<style>
</style>